package com.kalvan.log.datamodel;

import lombok.Getter;
import lombok.Setter;

/**
 * 日志图表分析需要的参数-做请求和响应数据收集
 *
 * @author chenliang
 */
@Setter
@Getter
public class RequestModelContext {
    private String merchant;
    private String business;
    private String processState;
    private Long processTime;
    private String ip;

    /**
     * 交易请求时使用构造函数
     *
     * @param merchant 商户
     * @param business 业务
     * @param ip       来源ip
     */
    public RequestModelContext(String merchant, String business, String ip) {
        super();
        this.merchant = merchant;
        this.business = business;
        this.ip = ip;
    }

    /**
     * 交易处理完时使用构造函数
     *
     * @param merchant     商户
     * @param business     业务
     * @param ip           来源ip
     * @param processState 业务状态
     * @param processTime  业务处理时间毫秒
     */
    public RequestModelContext(String merchant, String business, String ip,
                               String processState, Long processTime) {
        super();
        this.merchant = merchant;
        this.business = business;
        this.processState = processState;
        this.processTime = processTime;
        this.ip = ip;
    }
}
